package com.team.controller;

import com.team.entity.AppCategory;
import com.team.service.AppCategoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Required;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

@Controller
public class AppCategoryController {
    @Autowired(required = false)
    private AppCategoryService appCategoryService;

    @ResponseBody
    @RequestMapping(value = "/getAppCategory")
    public List<AppCategory> getAppCategory(Long parentid){
        List<AppCategory> list = appCategoryService.getCategoryByParent(parentid);
        return list;
    }
}
